package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.pro.domain.entity.LabelEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author mingliang
 * @Description
 * @Date 2022/7/4 9:07
 **/
@Getter
@Setter
public class KnowledgeTagEntity {
    /**
     * id
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;

    /**
     * 标签id
     */
    private String name;

    /**
     * 颜色
     */
    private String color;

    /**
     * 标签分组id
     */
    private Long parentId;

    /**
     * 排序值
     */
    private Integer sort;

    /**
     * 1分组，0标签
     */
    private Integer parentType;

    /**
     * 创建人userId
     */
    private String creatorId;

    /**
     * 同名不同组的数量
     */
    private Integer sameCount;

    /**
     * 1回收站0非回收站
     */
    private Integer recycleBin;

    /**
     * 删除标志
     */
    protected Integer del;

    /**
     * 添加时间
     */
    protected Long addTime;

    /**
     * 更新时间
     */
    protected Long updateTime;

    public KnowledgeTagEntity() {
        this.del = DelEnum.NORMAL.getDel();
    }

    public KnowledgeTagEntity(LabelEntity labelEntity) {
        super();
        this.id = labelEntity.getId();
        this.name = labelEntity.getName();
        this.corpid = labelEntity.getCorpid();
        this.color = labelEntity.getColor();
        this.parentId = labelEntity.getGroupId();
    }
}